
		

-- D:\GOA\reslibrary\templete\res\modal\modalmgr.xsl 58
gr_module("gm_xinbanchunzhongyun")


mcgfcompanymgr = inherit(GmSql.list,GmBase.CallBack):name("mcgfcompanymgr")



mcgfcompanymgr.init = function (self,pagecount)

	local top = self
	
	
	GmSql.list.init(self,gInfo["path"]..'/'..g_local_db_name,'czy_company')
	GmBase.CallBack.init(self)
	
	self.baseurl = ''

	self.idPair = {}
	self.idPair['prev'] = '0'
	self.idPair['next'] = '0'
	
	self.pageCount = pagecount or 10
	self.totalPage = 0
	
	self:reset_maxminid('czy_company','id')
	
	
	self.action = {}
	self.op  = {}
	
	
	
	-----------------------------
	self.action['cgfcompanypost'] = {} 	
	-------
	self.op['cgfcompanypost'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfcompanypost()
		for a,b in pairs(top.action['cgfcompanypost']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfcompanypost(newpostparam)
		
	end	
		
  self.action['cgfcompanypost']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfcompanypost']['name'] = { ['title'] = '公司' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['info'] = { ['title'] = 'info' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfcompanypost']['tel'] = { ['title'] = 'tel' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['fax'] = { ['title'] = 'fax' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['email'] = { ['title'] = 'email' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['address'] = { ['title'] = '地址' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['account'] = { ['title'] = '閾惰璐﹀' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['logo'] = { ['title'] = 'logo' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['zip_code'] = { ['title'] = 'zip_code' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['msn'] = { ['title'] = 'msn' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['qq'] = { ['title'] = 'qq' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['hotline'] = { ['title'] = 'hotline' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['phone'] = { ['title'] = 'phone' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['linkman'] = { ['title'] = 'linkman' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['theme_id'] = { ['title'] = 'theme_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfcompanypost']['province'] = { ['title'] = 'province' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '30' }	
  self.action['cgfcompanypost']['lot'] = { ['title'] = '鏈嶅姟鍣ㄥ勾璐归噾棰?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfcompanypost']['background'] = { ['title'] = '鑳屾櫙鍥?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['web'] = { ['title'] = '缃戝潃' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['coefficient'] = { ['title'] = '绯绘暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfcompanypost']['kshow_name'] = { ['title'] = 'kshow璐︽埛鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['kshow_password'] = { ['title'] = 'kshow璐︽埛瀵嗙爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanypost']['kshow_key'] = { ['title'] = 'kshow鐧诲綍楠岃瘉鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }
  self.action['cgfcompanypost']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfcompanyitem'] = {} 	
	-------
	self.op['cgfcompanyitem'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfcompanyitem()
		for a,b in pairs(top.action['cgfcompanyitem']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfcompanyitem(newpostparam)
		
	end	
		
  self.action['cgfcompanyitem']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfcompanyitem']['name'] = { ['title'] = '公司' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['info'] = { ['title'] = 'info' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfcompanyitem']['tel'] = { ['title'] = 'tel' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['fax'] = { ['title'] = 'fax' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['email'] = { ['title'] = 'email' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['address'] = { ['title'] = '地址' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['account'] = { ['title'] = '閾惰璐﹀' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['logo'] = { ['title'] = 'logo' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['zip_code'] = { ['title'] = 'zip_code' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['msn'] = { ['title'] = 'msn' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['qq'] = { ['title'] = 'qq' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['hotline'] = { ['title'] = 'hotline' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['phone'] = { ['title'] = 'phone' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['linkman'] = { ['title'] = 'linkman' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['theme_id'] = { ['title'] = 'theme_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfcompanyitem']['province'] = { ['title'] = 'province' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '30' }	
  self.action['cgfcompanyitem']['lot'] = { ['title'] = '鏈嶅姟鍣ㄥ勾璐归噾棰?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfcompanyitem']['background'] = { ['title'] = '鑳屾櫙鍥?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['web'] = { ['title'] = '缃戝潃' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['coefficient'] = { ['title'] = '绯绘暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfcompanyitem']['kshow_name'] = { ['title'] = 'kshow璐︽埛鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['kshow_password'] = { ['title'] = 'kshow璐︽埛瀵嗙爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanyitem']['kshow_key'] = { ['title'] = 'kshow鐧诲綍楠岃瘉鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }
  self.action['cgfcompanyitem']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfcompanymodify'] = {} 	
	-------
	self.op['cgfcompanymodify'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfcompanymodify()
		for a,b in pairs(top.action['cgfcompanymodify']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfcompanymodify(newpostparam)
		
	end	
		
  self.action['cgfcompanymodify']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfcompanymodify']['name'] = { ['title'] = '公司' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['info'] = { ['title'] = 'info' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfcompanymodify']['tel'] = { ['title'] = 'tel' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['fax'] = { ['title'] = 'fax' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['email'] = { ['title'] = 'email' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['address'] = { ['title'] = '地址' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['account'] = { ['title'] = '閾惰璐﹀' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['logo'] = { ['title'] = 'logo' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['zip_code'] = { ['title'] = 'zip_code' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['msn'] = { ['title'] = 'msn' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['qq'] = { ['title'] = 'qq' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['hotline'] = { ['title'] = 'hotline' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['phone'] = { ['title'] = 'phone' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['linkman'] = { ['title'] = 'linkman' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['theme_id'] = { ['title'] = 'theme_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfcompanymodify']['province'] = { ['title'] = 'province' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '30' }	
  self.action['cgfcompanymodify']['lot'] = { ['title'] = '鏈嶅姟鍣ㄥ勾璐归噾棰?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfcompanymodify']['background'] = { ['title'] = '鑳屾櫙鍥?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['web'] = { ['title'] = '缃戝潃' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['coefficient'] = { ['title'] = '绯绘暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfcompanymodify']['kshow_name'] = { ['title'] = 'kshow璐︽埛鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['kshow_password'] = { ['title'] = 'kshow璐︽埛瀵嗙爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanymodify']['kshow_key'] = { ['title'] = 'kshow鐧诲綍楠岃瘉鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }
  self.action['cgfcompanymodify']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfcompanydetail'] = {} 	
	-------
	self.op['cgfcompanydetail'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfcompanydetail()
		for a,b in pairs(top.action['cgfcompanydetail']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfcompanydetail(newpostparam)
		
	end	
		
  self.action['cgfcompanydetail']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfcompanydetail']['name'] = { ['title'] = '公司' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['info'] = { ['title'] = 'info' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfcompanydetail']['tel'] = { ['title'] = 'tel' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['fax'] = { ['title'] = 'fax' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['email'] = { ['title'] = 'email' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['address'] = { ['title'] = '地址' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['account'] = { ['title'] = '閾惰璐﹀' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['logo'] = { ['title'] = 'logo' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['zip_code'] = { ['title'] = 'zip_code' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['msn'] = { ['title'] = 'msn' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['qq'] = { ['title'] = 'qq' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['hotline'] = { ['title'] = 'hotline' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['phone'] = { ['title'] = 'phone' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['linkman'] = { ['title'] = 'linkman' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['theme_id'] = { ['title'] = 'theme_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfcompanydetail']['province'] = { ['title'] = 'province' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '30' }	
  self.action['cgfcompanydetail']['lot'] = { ['title'] = '鏈嶅姟鍣ㄥ勾璐归噾棰?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfcompanydetail']['background'] = { ['title'] = '鑳屾櫙鍥?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['web'] = { ['title'] = '缃戝潃' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['coefficient'] = { ['title'] = '绯绘暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfcompanydetail']['kshow_name'] = { ['title'] = 'kshow璐︽埛鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['kshow_password'] = { ['title'] = 'kshow璐︽埛瀵嗙爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanydetail']['kshow_key'] = { ['title'] = 'kshow鐧诲綍楠岃瘉鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }
  self.action['cgfcompanydetail']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfcompanylist'] = {} 	
	-------
	self.op['cgfcompanylist'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfcompanylist()
		for a,b in pairs(top.action['cgfcompanylist']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfcompanylist(newpostparam)
		
	end	
		
  self.action['cgfcompanylist']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfcompanylist']['name'] = { ['title'] = '公司' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['info'] = { ['title'] = 'info' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfcompanylist']['tel'] = { ['title'] = 'tel' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['fax'] = { ['title'] = 'fax' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['email'] = { ['title'] = 'email' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['address'] = { ['title'] = '地址' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['account'] = { ['title'] = '閾惰璐﹀' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['logo'] = { ['title'] = 'logo' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['zip_code'] = { ['title'] = 'zip_code' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['msn'] = { ['title'] = 'msn' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['qq'] = { ['title'] = 'qq' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['hotline'] = { ['title'] = 'hotline' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['phone'] = { ['title'] = 'phone' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['linkman'] = { ['title'] = 'linkman' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['theme_id'] = { ['title'] = 'theme_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfcompanylist']['province'] = { ['title'] = 'province' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '30' }	
  self.action['cgfcompanylist']['lot'] = { ['title'] = '鏈嶅姟鍣ㄥ勾璐归噾棰?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfcompanylist']['background'] = { ['title'] = '鑳屾櫙鍥?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['web'] = { ['title'] = '缃戝潃' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['coefficient'] = { ['title'] = '绯绘暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfcompanylist']['kshow_name'] = { ['title'] = 'kshow璐︽埛鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['kshow_password'] = { ['title'] = 'kshow璐︽埛瀵嗙爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfcompanylist']['kshow_key'] = { ['title'] = 'kshow鐧诲綍楠岃瘉鍚?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }
  self.action['cgfcompanylist']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
  
 
  	
  
	self.session = {}
	
end   





mcgfcompanymgr.check_fields_validate = function(self,key,postparam)
	local checkfunc = {}
	checkfunc['t'] = function(fm,value)
		return true
	end
	checkfunc['min'] = function(fm,value)
		if string.len(value) < tonumber(fm) then
			return false
		end
		return true
	end
	checkfunc['max'] = function(fm,value)
		if string.len(value) > tonumber(fm) then
			return false
		end
		return true
	end
	local format = self.action[key]
	for fkey,fvalue in pairs(postparam) do
		if format[fkey] ~= nil then
			for fmkey,fmvalue in pairs(format[fkey]) do
				if checkfunc[fmkey] ~= nil then
					if checkfunc[fmkey](fmvalue,fvalue) == false then
						return false,tostring(format[fkey]['title']).." "..tostring(fmkey).." "..tostring(fmvalue).." error"
					end
				end
			end
		end
	end
	return true,""
end 


 
mcgfcompanymgr.get_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key]
end

mcgfcompanymgr.has_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key] ~= nil
end
 
 
mcgfcompanymgr.add_session = function(self,key,ses)
	self.session[key] = ses
end


mcgfcompanymgr.add_ui = function(self,key,ui)
	self.uis[key] = ui
end




-- todo
mcgfcompanymgr.run = function(self,key,ui)
	if self.action[key] ~= nil and self.op[key] ~= nil then
		local tb = {}
		for k,v in pairs(self.action[key]) do
			if ui[k] ~= nil and type(ui[k]) == 'table' and ui[k].get_text then
				tb[k] = ui[k]:get_text()
			else
				print('run error',key,k)
			end
		end
		local success,msg = self:check_fields_validate(key,tb)
		if success then
			self.op[key](tb,ui)
		else
			ui.hostWindow:showMsg(msg)
		end		
	else
		print('run error self.action',key)
	end
end


------------------------------------------------------------------------------------


mcgfcompanymgr.get_net_page = function(self,netmethon,attrs)
	local top = self	
	local discuz = GmBase.net.get_instance()
	local methon = netmethon
	if methon ~= nil and discuz[methon] then
		print('mcgfcompanymgr.get_net_page ',methon)
		local tbname,callbackey,tb = discuz[netmethon](discuz)
		for k,v in pairs(attrs) do
			tb[k] = attrs[k]
		end
		discuz[netmethon](discuz,tb)
	else
		print('mcgfcompanymgr.get_net_page error ',methon)
	end		
end




mcgfcompanymgr.get_prev_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfcompanylist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page - 1		

		if attrs.page < 1 then
			attrs.page = 1
		end

		self:get_net_page(ui.netmethon,attrs)
	end
end


mcgfcompanymgr.get_next_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfcompanylist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page + 1
		self:get_net_page(ui.netmethon,attrs)
	end
end

------------------------------------------------------------------------------------



mcgfcompanymgr.init_table = function(self)
	--[[
	local tablefield = {}
	
	--number
	tablefield['id'] = { ["i"] = 11, }
    
	--string
	tablefield['name'] = { ["v"] = 255, }
    
	--string
	tablefield['info'] = { ["v"] = 20, }
    
	--string
	tablefield['tel'] = { ["v"] = 255, }
    
	--string
	tablefield['fax'] = { ["v"] = 255, }
    
	--string
	tablefield['email'] = { ["v"] = 255, }
    
	--string
	tablefield['address'] = { ["v"] = 255, }
    
	--string
	tablefield['account'] = { ["v"] = 255, }
    
	--string
	tablefield['logo'] = { ["v"] = 255, }
    
	--string
	tablefield['zip_code'] = { ["v"] = 255, }
    
	--string
	tablefield['msn'] = { ["v"] = 255, }
    
	--string
	tablefield['qq'] = { ["v"] = 255, }
    
	--string
	tablefield['hotline'] = { ["v"] = 255, }
    
	--string
	tablefield['phone'] = { ["v"] = 255, }
    
	--string
	tablefield['linkman'] = { ["v"] = 255, }
    
	--number
	tablefield['theme_id'] = { ["i"] = 4, }
    
	--string
	tablefield['province'] = { ["v"] = 30, }
    
	--string
	tablefield['lot'] = { ["v"] = 64, }
    
	--string
	tablefield['background'] = { ["v"] = 255, }
    
	--string
	tablefield['web'] = { ["v"] = 255, }
    
	--string
	tablefield['coefficient'] = { ["v"] = 16, }
    
	--string
	tablefield['kshow_name'] = { ["v"] = 255, }
    
	--string
	tablefield['kshow_password'] = { ["v"] = 255, }
    
	--string
	tablefield['kshow_key'] = { ["v"] = 255, }
    
	self:create_table( self.tablename, tablefield)
	]]
	self:initTableStruct()
end


	